package com.pay.paytoken.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.pay.paytoken.R;
import com.pay.paytoken.base.BaseTitleActivity;

import butterknife.Bind;
import butterknife.OnClick;


public class HelpActivity extends BaseTitleActivity {

    @Bind(R.id.tv_help_verify)
    TextView mTvHelpVerify;
    @Bind(R.id.tv_help_lose)
    TextView mTvHelpLose;
    @Bind(R.id.tv_help_unload)
    TextView mTvHelpUnload;
    private String mUrl;
    private String mTitle;

    @Override
    public int setView() {
        return R.layout.activity_help;
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @Override
    public void initView() {
        mTitleLeft.setVisibility(View.VISIBLE);
        mTitleRight.setVisibility(View.INVISIBLE);
        mTitleName.setText(R.string.help);
    }

    @OnClick({R.id.tv_help_verify, R.id.tv_help_lose, R.id.tv_help_unload})
    public void onViewClicked(View view) {
        Intent intent = new Intent(this, HelpDetailActivity.class);
        switch (view.getId()) {
            case R.id.tv_help_verify:
                mUrl = "https://www.baidu.com";
                mTitle = mTvHelpVerify.getText().toString();
                break;
            case R.id.tv_help_lose:
                mUrl = "http://www.jtpay.com";
                mTitle = mTvHelpLose.getText().toString();
                break;
            case R.id.tv_help_unload:
                mUrl = "http://www.jtpay.com";
                mTitle = mTvHelpUnload.getText().toString();
                break;
        }
        intent.putExtra("URL", mUrl);
        intent.putExtra("mTitle", mTitle);
        startActivity(intent);
    }
}
